import { createRouter, createWebHistory } from 'vue-router'
import MyLogin from '../views/MyLogin'
import MyHome from '../views/MyHome'
import MyCeHome from '../views/MyCeHome'
import UserList from '../views/UserList'
import RoleList from '../views/RoleList'
import LimitsList from '../views/LimitsList'
import ShopList from '../views/ShopList'
import ClassifyParameter from '../views/ClassifyParameter'
import ShopClassify from '../views/ShopClassify'
import AddShopList from '../views/AddShopList'
import DataList from '../views/DataList'


const routes = [
  {
    path: '/mylogin',
    name: 'MyLogin',
    component: MyLogin,
  },
  {
    path: '/',
    redirect: '/mylogin',
  },
  {
    path: '/myhome',
    name: 'MyHome',
    component: MyHome,
    children: [
      {
        path: 'mycehome',
        name: 'MyCeHome',
        component: MyCeHome,
      },
      {
        path: 'userlist',
        name: 'UserList',
        component: UserList,
      },
      {
        path: 'rolelist',
        name: 'RoleList',
        component: RoleList,
      },
      {
        path: 'limitslist',
        name: 'LimitsList',
        component: LimitsList,
      },
      {
        path: 'shoplist',
        name: 'ShopList',
        component: ShopList,
      },
      {
        path: 'classifyparameter',
        name: 'ClassifyParameter',
        component: ClassifyParameter,
      },
      {
        path: 'shopclassify',
        name: 'ShopClassify',
        component: ShopClassify,
      },
      {
        path: 'addshoplist',
        name: 'AddShopList',
        component: AddShopList,
      },
      {
        path: 'dataList',
        name: 'dataList',
        component: DataList,
      },
    ]
  },

]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
